package com.example.schedule.handle.base;

import lombok.Data;

import java.util.concurrent.ScheduledFuture;

/**
 * @author wangbin
 */
@Data
public abstract class AbstractSchedule implements Runnable {
    ScheduledFuture<?> scheduledFuture;

    public boolean isRunning() {
        return getScheduledFuture() != null && !getScheduledFuture().isDone();
    }
}
